import http from "./http.js";

//上传图片
export const uploadImg = http.BASE_URL + "/api/index/upload";


//获取授权链接
export function wxLogin(data) {
	return http.request({
			url: `/student/wxLogin`,
			method: "post",
		},
		data,
		false
	);
}

//发送短信
export function sendMsg(data) {
	return http.request({
			url: `/common/sms/sendMsg`,
			method: "get",
		},
		data,
		false
	);
}


// 获取用户协议/隐私政策
export function qryByType(data) {
	return http.request({
			url: `/course/protocol/qryByType/${data.type}`,
			method: "get",
		},
		data,
		false
	);
}



//手机号验证码登录
export function login(data) {
	return http.request({
			url: `/student/login`,
			method: "post",
		},
		data,
		false
	);
}


//查询学校列表
export function listAllSchool(data) {
	return http.request({
			url: `/student/listAllSchool`,
			method: "get",
		},
		data,
		false
	);
}


//填写资料 查询年级班级树
export function qryGradeClazzTree(data) {
	return http.request({
			url: `/student/qryGradeClazzTree/${data.schoolId}`,
			method: "get",
		},
		data,
		false
	);
}

//查询家长信息（家长角色）
export function getParentsInfo(data) {
	return http.request({
			url: `/student/getParentsInfo`,
			method: "get",
		},
		data,
		false
	);
}


//填写资料提交 (绑定学生)
export function bindStudent(data) {
	return http.request({
			url: `/student/bindStudent`,
			method: "post",
		},
		data,
		false
	);
}


//选择角色
export function editLoginType(data) {
	return http.request({
			url: `/student/editLoginType?userType=${data.userType}`,
			method: "post",
		},
		// data,
		false
	);
}


//查询轮播图
export function qryAllCarousel(data) {
	return http.request({
			url: `/student/qryAllCarousel`,
			method: "get",
		},
		data,
		false
	);
}


//公告栏-查询公告列表
export function announcementList(data) {
	return http.request({
			url: `/course/announcement/list`,
			method: "get",
		},
		data,
		false
	);
}


//公告栏-查看公告详情
export function viewAnnouncement(data) {
	return http.request({
			url: `/student/viewAnnouncement/${data.id}`,
			method: "get",
		},
		data,
		false
	);
}

//查询公告弹窗
export function qryAnnouncementPopUp(data) {
	return http.request({
			url: `/student/qryAnnouncementPopUp`,
			method: "get",
		},
		data,
		false
	);
}